<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>我的订单</title>
    <link rel="stylesheet" th:href="@{/static/css/minireset.css}" />
    <link rel="stylesheet" th:href="@{/static/css/common.css}" />
    <link rel="stylesheet" th:href="@{/static/css/cart.css}" />
    <link rel="stylesheet" th:href="@{/static/css/bookManger.css}" />
    <link rel="stylesheet" th:href="@{/static/css/orderManger.css}" />
    <script language="JavaScript" th:src="@{/static/script/order.js}"></script>
  </head>
  <body>
    <div class="header">
      <div class="w">
        <div class="header-left">

          <h1>我的订单</h1>
        </div>
        <div class="header-right">
          <h3>欢迎<span th:text="${session.loginuser.user_name}">张总</span>光临商城</h3>
          <a th:href="@{/page.do?operate=page&page=login}" class="register">注销</a>
          <div class="gohome">
          <a th:href="@{/cart.do}">返回</a>
        </div>
        </div>
      </div>
    </div>
    <div class="list">
      <div class="w">
        <table>
          <thead>
            <tr>
              <th>订单号</th>
              <th>订单日期</th>
              <th>订单金额</th>
              <th>商品数量</th>
              <th>订单状态</th>
              <th>订单详情</th>
            </tr>
          </thead>
          <tbody>
            <tr th:each="order : ${session.loginuser.orderList}" th:object="${order}">
              <td th:text="*{order_No}">12354456895</td>
              <td th:text="*{#dates.format(order_Date,'yyyy-MM-dd HH:mm:ss')}">2015.04.23</td>
              <td th:text="*{order_Money}">90.00</td>
              <td th:text="*{order_count}">88</td>
              <td th:if="*{order_status==1}" class="send">等待发货</td>
              <td th:if="*{order_status==2}" class="send">请到店家收货</td>
              <td th:if="*{order_status==3}" class="send">等待派送员接单</td>
              <td th:if="*{order_status==4}" class="send">等待派送员送达
                <input type="button" value="完成订单" class="btn" style="border-style:none;color: #ff0000"
                       th:onclick="|finishOrder(*{order_ID})|"/>
              </td>

              <td th:if="*{order_status==5}" class="send">订单完成</td>
              <td><a th:href="@{/order.do(operate='detail',order_ID = *{order_ID})}" >
                查看详情
              </a></td>
            </tr>

          </tbody>
        </table>

      </div>
    </div>
  </body>
</html>
